<div class="wrapper">

  {{menu}}

  <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-lg-12">
            <div class="view-header">
              <div class="header-title" style="float:left;">
                <h3 class="m-b-xs">All reports</h3>
                <small>View all reports, search for reports and share or delete them.</small>
              </div>
              <div class="search hidden-xs" style="margin-top: 15px;width: 345px;float:right;">
                <form method="get">
                  <input type="text" value="{{searchQuery[0]}}" name="search" placeholder="Search for domain, IP or URL" class="form-control" style="float: left;width: 260px;">
                  <button type="submit" class="btn" style="float:right;">Search</button>
                </form>
              </div>
            </div>
            <hr>
          </div>
        </div>

        <div class="row">

          <div class="col-lg-12">
            <div class="panel panel-filled">
              <div class="panel-heading">Information</div>
              <div class="panel-body">
                <div class="table-responsive">

                  <table style="white-space: nowrap;" class="table">
                    <thead>
                      <tr>
                        <th>ID</th>
                        <th>View</th>
                        <th>Domain</th>
                        <th>URL</th>
                        <th>IP</th>
                      </tr>
                    </thead>
                    <tbody>
                      {{reportsList[0]}}
                    </tbody>
                  </table>

                  <div class="col-sm-6">
                    <div class="dataTables_paginate paging_simple_numbers">
                      <ul class=pagination>
                        <li class="paginate_button previous">
                          <a href="?page={{page[-]}}{{searchQuery[1]}}">Previous</a>
                        </li>
                        <li class="paginate_button active">
                          <a href="?page={{page[]}}{{searchQuery[1]}}">{{page[]}}</a>
                        </li>
                        <li class="paginate_button next">
                          <a href="?page={{page[+]}}{{searchQuery[1]}}">Next</a>
                        </li>
                      </ul>
                    </div>
                  </div>

                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
  </section>

  <div class="modal fade" id="shareModal" role="dialog">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h3 class="m-b-xs">Share</h3>
          <small>Share your reports using direct link or with other ezXSS users</small>
        </div>
        <div class="modal-body">
          <div id="alert"></div>
          <form class="form" id="share-report">
            {{csrf[]}}
            <input type=hidden hidden id="reportid" value="0">

            <div class="form-group">
              <label class="control-label" for="domain">Direct share link</label>
              <input type="text" id="shareid" value="" class="form-control">
            </div>

            <hr>

            <div class="form-group">
              <label class="control-label" for="domain">Domain</label>
              <input type="text" name="domain" id="domain" value="" class="form-control">
            </div>
            <button class="btn">Share</button>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>

  <script type="text/javascript">
    var csrf = "{{csrf[true]}}";
  </script>
</div>
